﻿using System.ComponentModel.DataAnnotations;
using Localization;
using SinBiota.Model.Entities.CustomAttributes;

namespace SinBiota.Model.Entities
{
    [LocalizedName("OccurrenceAuthor", NameResourceType = typeof(Strings))]
    public class OccurrenceAuthor : BaseEntity
    {
        [LocalizedName("Name", NameResourceType = typeof(Strings))]
        [Required(ErrorMessageResourceType = typeof(Messages), ErrorMessageResourceName = "FieldCannotBeEmpty")]
        public virtual string Name { get; set; }

        [LocalizedName("Address", NameResourceType = typeof(Strings))]
        public virtual string Address { get; set; }

        [LocalizedName("PhoneNumber", NameResourceType = typeof(Strings))]
        public virtual string PhoneNumber { get; set; }

        [LocalizedName("FaxNumber", NameResourceType = typeof(Strings))]
        public virtual string FaxNumber { get; set; }

        [LocalizedName("Email", NameResourceType = typeof(Strings))]
        [ValidEmail(ErrorMessageResourceType = typeof(Messages), ErrorMessageResourceName = "InvalidEmail")]
        public virtual string Email { get; set; }

        [LocalizedName("Institution", NameResourceType = typeof(Strings))]
        public virtual Institution Institution { get; set; }



    }
}
